{"componentChunkName":"component---src-templates-tutorial-js","path":"/en/tutorial/MapTiles/MultiProcessTiles/","webpackCompilationHash":"b8493fc551f7d6152954","result":{"data":{"markdownRemark":{"html":"<p><br>\nThe traditional way to generate map tiles is in a single task, and with the\ndevelopment of technology, the quantity of data is more and more huge, and\ngenerating tiles in a single task needs more and more time. if you want to\ngenerate tiles for a map like the China Map, it will take for dozens of days</p>\n<p>To improve the generating-tiles efficiency,  introduces the feature of\ngenerating tiles in multiple tasks which allows you to open multiple threads\nin a machine or several machines to generate tiles in parallel. The feature\nmakes the most of hardware resources of computers thereby improves the\nefficiency, stability and reliability of generating tiles and online services.</p>\n<h3 id=\"theory-of-map-tilemulti-task\"><a href=\"#theory-of-map-tilemulti-task\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Theory of Map Tile(Multi-task)</h3>\n<p>Theory of Map Tile(Multi-task) is to divide the task of generating tiles into a lot of child tasks according to the scales, the geographic ranges, etc. of maps, and then deploys these child tasks at a shared directory. Start multiple threads at several machines and every thread gets a task from a specified directory and then run it. All results will be saved into the same folder and the folder can be a local one or in a MongoDB database.</p>\n<p>\n  <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/iDesktop/static/75c8d8bf24bb68516260dafb1868edd9/2c041/MultiProcessTilesPrinciple.jpg\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n  \n  <span\n    class=\"gatsby-resp-image-wrapper\"\n    style=\"position: relative; display: block;  max-width: 840px; margin-left: auto; margin-right: auto;\"\n  >\n    <span\n      class=\"gatsby-resp-image-background-image\"\n      style=\"padding-bottom: 52.78293135435992%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAALABQDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAIBAwX/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAAB3B0ILBP/xAAYEAEBAAMAAAAAAAAAAAAAAAABAAIRMf/aAAgBAQABBQLbM5Iz2//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABgQAAIDAAAAAAAAAAAAAAAAABARIDEy/9oACAEBAAY/AqGXD//EABsQAQACAgMAAAAAAAAAAAAAAAEAERBRITFx/9oACAEBAAE/IWg5Tw9blUGN2YF0cf/aAAwDAQACAAMAAAAQsP8A/8QAFREBAQAAAAAAAAAAAAAAAAAAARD/2gAIAQMBAT8QJ//EABcRAQADAAAAAAAAAAAAAAAAAAABESH/2gAIAQIBAT8QnVv/xAAaEAEAAgMBAAAAAAAAAAAAAAABABEQMUEh/9oACAEBAAE/EBJcrXnIVrZwUiQc4LBAFlQ1P//Z'); background-size: cover; display: block;\"\n    >\n      <img\n        class=\"gatsby-resp-image-image\"\n        style=\"width: 100%; height: 100%; margin: 0; vertical-align: middle; position: absolute; top: 0; left: 0; box-shadow: inset 0px 0px 0px 400px white;\"\n        alt=\"MultiProcessTilesPrinciple\"\n        title=\"\"\n        src=\"/iDesktop/static/75c8d8bf24bb68516260dafb1868edd9/3d180/MultiProcessTilesPrinciple.jpg\"\n        srcset=\"/iDesktop/static/75c8d8bf24bb68516260dafb1868edd9/458aa/MultiProcessTilesPrinciple.jpg 210w,\n/iDesktop/static/75c8d8bf24bb68516260dafb1868edd9/3616f/MultiProcessTilesPrinciple.jpg 420w,\n/iDesktop/static/75c8d8bf24bb68516260dafb1868edd9/3d180/MultiProcessTilesPrinciple.jpg 840w,\n/iDesktop/static/75c8d8bf24bb68516260dafb1868edd9/2c041/MultiProcessTilesPrinciple.jpg 1078w\"\n        sizes=\"(max-width: 840px) 100vw, 840px\"\n      />\n    </span>\n  </span>\n  \n  </a>\n      </p>\n<h3 id=\"key-points-of-map-tilemulti-task\"><a href=\"#key-points-of-map-tilemulti-task\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Key points of Map Tile(Multi-task)</h3>\n<p>When performing the feature in , you should notice:</p>\n<ul>\n<li><strong>Datasources are read-only</strong> : Since multiple tasks access a datasource at the same time, the datasource will be occupied by one of tasks and other tasks can not access the datasource. Hence, before performing the feature Map Tile(Multi-task), you must re-open your datasoure in read-only mode and then save your workspace.</li>\n<li><strong>Divide tasks</strong> : You need to specify how many child tasks are required. The program will generate a sci file according to scales, tile ranges and so on and then divides the sci file into several child sci files.</li>\n<li><strong>A shared directory</strong> : A shared directory: After dividing tasks, a folder in the Working Directory is created for saving the sci file and all child sic files. And then set the directory as a shared directory to ensure other machines can read and write the directory, which means other machines can get tasks and save results conveniently.</li>\n<li><strong>Perform tasks</strong> : Other machines need to access the host machine successfully to perform the feature, hence, you should check whether the connection between host machine and other machines is open. You can enter an address like \\\\198.168.1.20(host ip) to check.</li>\n</ul>","frontmatter":{"title":"Map Tile(Multi-task)","next":null,"prev":null},"fields":{"path":"content\\en\\tutorial\\MapTiles\\MultiProcessTiles.md","slug":"/en/tutorial/MapTiles/MultiProcessTiles/","langKey":"en"}}},"pageContext":{"isCreatedByStatefulCreatePages":false,"slug":"/en/tutorial/MapTiles/MultiProcessTiles/"}}}